Scroll Progress Bar

Variables

The value stored in the memory locations will be given unique names to identify them. Their names are called “variable names".

a
25

Here a is a variable name and 25 is constant

Thus variable ‘a’ can be defined as

  • It is a place holder of a constant.
  • It is a name given to memory location.
  • Whenever a new constant is coming in, the old value automatically removes.
Rules for naming variable:
  1. Maximum of 32 characters.
  2. It must begin with an alphabet
  3. Digits are allowed
  4. Except underscore(_), no other characters are allowed.
  5. Keywords are not allowed
Declaration Statement:
Syntax: datatype var-1[, var-2, …];

What stores the memory address of a variable in C?


Pointer

What keyword is used to define constants in C?


const

What is a variable that holds the memory address of a function in C?


Function pointer